﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户首页</title>
    <link href="/css/common.css" rel="stylesheet" type="text/css" /> 
    <link href="/css/account.css" rel="stylesheet" type="text/css" />
    <link href="/css/blog.css" rel="stylesheet" type="text/css" />
	<script src="/js/jquery.js" language="javascript" type="text/javascript"></script>
    <script src="/js/common.js" language="javascript" type="text/javascript"></script>
    <script src="/js/caretInsert.js" language="javascript" type="text/javascript"></script>  
    <!--[if lt IE 7]> 
    <script src="/js/png.js" language="javascript" type="text/javascript"></script>
    <![endif]-->
    <script language="javascript" type="text/javascript">
		var sela;
    	$(function(){
			$("#getFace").click(function(){
				var offset = $(this).offset();
				$(".face").css("left",offset.left);
				$(".face").css("top",offset.top);
				$(".face").fadeIn();
			}),
			$('.send textarea').keypress(function(){
				if($(this).val().length<=250){
					$('.send b').removeClass();
					$('.send b').text(250-$(this).val().length);
				}
				else{
					$('.send b').addClass("red");
				}
			}),
			$(".face a").click(function(){  
				$('.send textarea').setCaret();
        		$('.send textarea').insertAtCaret($(this).attr("tag"));
				if($('.send textarea').val().length<=250){
					$('.send b').removeClass();
					$('.send b').text(250-$('.send textarea').val().length);
				}
				else{
					$('.send b').addClass("red");
				}
			}),
			$("#closeFace").click(function(){
				$(".face").fadeOut();	
			}),
			$(".resend img").click(function(){
				if(this.alt=="删除")
					$(this).parent().parent().fadeOut();
			}),
			$(".asend").click(function(){
				if(sela!=this){
					$(sela).parent().next("li").hide();
				}
				$(this).parent().next("li").toggle()
				.find("input[type=text]").focus();
				sela = this;
			})
		})
    </script>
</head>
<body>
	$Header$
    <div id="body">
    	<div class="left">
        	$LeftUserCmd$
            $LeftUserFriendAdd$
        </div>
        <div class="right">
        	<ul class="account">
            	<h1 class="blog"><a href="javascript:;" onclick="history.go(-1)">返回上一页</a><p><b>心情日记</b></p></h1>
                <li>
                	<div class="accdiv">
                    	<h2>
                            <a href="/Letter/In.aspx"><span>收件箱</span></a>
                            <a href="/Letter/Out.aspx"><span>发件箱</span></a>
                            <a href="/Letter/Notice.aspx"><span>通知</span></a>
                            <a href="/Letter/Add.aspx" class="sel"><span>写私信</span></a>
                        </h2>
                    	<ul>
                        	<li class="blogli">
                            	<div class="f_left">
                                	<form action="/Letter/Add.aspx" method="post">
                                	<ul class="send">
                                        <li><select name="selFriend">
                                        <option>选择好友</option>
                                        $FriendOption$
                                        </select></li>
                                        <li><input name="txtTitle" type="text" size="80" title="标题" /></li>
                                        <li><textarea name="txtContent" title="内容"></textarea></li>
                                        <li><a id="getFace"><img src="/images/face/c.gif" alt="表情" /></a><input class="input_btn" value="发送信件" type="submit"/> 
还剩下<b>250</b>/250个字符。</li>
                                    </ul>
                                    </form> 
                                </div>
                                <div class="f_right">
                                	<h3>• 私人信件：</h3>
                                	<ul>
                                    	<li>这里可以说任何悄悄话，只有你想要发的对方才能可以看见哦！</li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </li>
                <h6></h6>
            </ul>
        </div> 
    </div>
    <div class="Clear"></div>
    $Footer$
    <div class="face"><iframe frameborder="0" scrolling="no"></iframe>
    	<h5><img id="closeFace" src="/images/close.gif" alt="关闭" />选择您喜欢的表情</h5>
        <ul>
            $FaceList$
        </ul>
    </div>
</body>
</html>
